﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ShoppingCart.ascx.cs"
    Inherits="MobileShop.Controls.ShoppingCart" %>
<script type="text/javascript">
    
</script>
<div class='menus'>
    <asp:Repeater ID="rpt" runat="server">
        <ItemTemplate>
            <div class='menuitem'>
                <table>
                    <tr>
                        <td>
                            <div class='itemicon' style='height: 80px'>
                                <a href='<%# this.ResolveUrl("~/Product.aspx?product=") + MobileShop.Utilities.GetValidParam(Eval("ProductName").ToString()) + "_" + Eval("ID").ToString() %>'>
                                    <asp:Image Width="64px" ID="Image1" runat="server" ImageUrl='<%# Eval(MobileShop.BasePage.PRODUCT_IMAGE) %>' />
                                </a>
                            </div>
                        </td>
                        <td>
                            <div class='itemtitle'>
                                <a href='<%# this.ResolveUrl("~/Product.aspx?product=") + MobileShop.Utilities.GetValidParam(Eval("ProductName").ToString()) + "_" + Eval("ProductID").ToString() %>'>
                                    <%# Eval("ProductName") %> 
                                    <asp:Label class="productprice" style='font-size:11px' ID="Label1" runat="server" Text='<%# string.Format("({0:C})", Eval("CustomerPrice")) %>'></asp:Label>
                                </a>
                            </div>
                            <div style='margin-top: 5px'>
                                <b class='productDetailLabel'>Qty: </b>
                                <asp:TextBox ID="txtQuantity" ItemID='<%# Eval("ProductID") %>' runat="server" Text='<%# Eval("Quantity") %>' 
                                    Width="30px"></asp:TextBox>
                                <asp:LinkButton OnClientClick="if(!confirm('Remove this item?'))return false;" ID="lnkDelete" ItemID='<%# Eval("ProductID") %>' OnClick="lnkDelete_OnClick" runat="server" style='margin-left:10px'>
                                    <img src='<%# this.ResolveUrl("~/images/delete_icon.gif") %>' runat="server" />
                                </asp:LinkButton>
                                <div style='height: 5px'>
                                    &nbsp;</div>
                                <b class='productDetailLabel'>Total Amt: </b><span style='width: 55px; display: inline-block'>
                                    <asp:Label class="productprice" ID="lblTotalAmount" runat="server" Text='<%# string.Format("{0:C}", Eval("TotalAmount")) %>'></asp:Label></span>
                                <b class='productDetailLabel'>GST: </b>
                                <asp:Label class="productprice" ID="lblGST" runat="server" Text='<%# string.Format("{0:C}", Eval("GST")) %>'></asp:Label>
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
        </ItemTemplate>
    </asp:Repeater>
    
    <div style='margin-top:10px; padding:10px'>
        <asp:Label ID="lblNoItems" runat="server" Visible="false">No item added</asp:Label>
        <asp:Button ID="btnUpdate" Text="Update Cart" runat="server" OnClick="btnUpdate_OnClick" style='margin-left:75px' />
        <asp:Button ID="btnBuy" Text="BuyNow" runat="server" style='margin-left:5px' />
    </div>
</div>